<!--引用的元数据采集日志只是type传2-->
<template>
  <monitor :type="2" :task-name="taskName"></monitor>
</template>
<script>
  import monitor from '../metadata/monitor'
  export default {
    components: { monitor },
    data(){
      return {

      }
    },
    props: {
      taskName: {
        type: String,
        default: ''
      }
    },
  }
</script>

<!--<template>-->
  <!--<basic-container>-->

    <!--<avue-crud-->
      <!--ref="crud"-->
      <!--:table-loading="tableLoading"-->
      <!--:data="tableData"-->
      <!--:page.sync="page"-->
      <!--:option="tableOption"-->
      <!--@on-load="onLoad"-->
      <!--@refresh-change="onLoad"-->
    <!--&gt;-->
      <!--<template slot="state" slot-scope="scope">-->
        <!--<span v-html="_rtState(scope.row.state)" style="cursor: pointer;"></span>-->
      <!--</template>-->
      <!--<template slot-scope="scope" slot="menu">-->
        <!--<div v-show="scope.row.disabled">-->
          <!--&lt;!&ndash; <el-button type="text" size="small" icon="el-icon-edit-outline" :disabled="scope.row.state !== 'SUCCESS' && scope.row.state !== 'PAUSE' && scope.row.state !== 'FAILURE' && scope.row.state !== 'STOP'" @click="_reEdit(scope.row)" >{{$t('Edit')}}</el-button> &ndash;&gt;-->
          <!--<el-button type="text" size="small" :disabled="scope.row.state !== 'SUCCESS' && scope.row.state !== 'PAUSE' && scope.row.state !== 'FAILURE' && scope.row.state !== 'STOP'"  icon="el-icon-refresh" @click="_reRun(scope.row,scope.$index)" >{{$t('Rerun')}}</el-button>-->
          <!--<el-button type="text" size="small" icon="el-icon-circle-close" :disabled="scope.row.state !== 'FAILURE'" @click="_restore(scope.row,scope.$index)" >{{$t('Recovery Failed')}}</el-button>-->
          <!--<el-button type="text" size="small" :disabled="scope.row.state !== 'RUNNING_EXECUTION' && scope.row.state !== 'STOP'"  :icon="scope.row.state === 'STOP' ? 'el-icon-video-play' : 'el-icon-close'" @click="_stop(scope.row,scope.$index)" >{{scope.row.state === 'STOP' ? $t('Recovery Suspend') : $t('Stop')}}</el-button>-->
          <!--<el-button type="text" size="small" :icon="scope.row.state === 'PAUSE' ? 'el-icon-video-play' : 'el-icon-video-pause'" :disabled="scope.row.state !== 'RUNNING_EXECUTION' && scope.row.state !== 'PAUSE'" @click="_suspend(scope.row,scope.$index)" >{{scope.row.state === 'PAUSE' ? $t('Recovery Suspend') : $t('Pause')}}</el-button>-->
          <!--<el-popconfirm-->
            <!--:confirmButtonText="$t('Confirm')"-->
            <!--:cancelButtonText="$t('Cancel')"-->
            <!--icon="el-icon-info"-->
            <!--iconColor="red"-->
            <!--:title="$t('Delete?')"-->
            <!--@confirm="_delete(scope.row,scope.row.id)">-->
            <!--<el-button type="text" size="small" icon="el-icon-delete" :disabled="scope.row.state !== 'SUCCESS' && scope.row.state !== 'FAILURE' && scope.row.state !== 'STOP' && scope.row.state !== 'PAUSE'"  slot="reference">{{$t('Delete')}}</el-button>-->
          <!--</el-popconfirm>-->
          <!--&lt;!&ndash; <el-button type="text" size="small" icon="el-icon-s-operation" @click="_gantt(scope.row)" >{{$t('Gantt')}}</el-button> &ndash;&gt;-->
        <!--</div>-->
        <!--<div v-show="!scope.row.disabled">-->
          <!--&lt;!&ndash;Edit&ndash;&gt;-->
          <!--<el-button type="info" size="mini" con="el-icon-edit-outline" :disabled="true" ></el-button>-->
          <!--&lt;!&ndash;Rerun&ndash;&gt;-->
          <!--<el-button v-show="buttonType === 'run'" type="info" size="mini" :disabled="true"><span style="padding: 0 2px">{{scope.row.count}}</span></el-button>-->
          <!--<el-button v-show="buttonType !== 'run'" type="info" size="mini" icon="el-icon-refresh" :disabled="true"></el-button>-->
          <!--&lt;!&ndash;Store&ndash;&gt;-->
          <!--<el-button v-show="buttonType === 'store'" type="success" size="mini" :disabled="true"><span style="padding: 0 3px">{{scope.row.count}}</span></el-button>-->
          <!--<el-button v-show="buttonType !== 'store'" type="success" size="mini" icon="el-icon&#45;&#45;close" :disabled="true"></el-button>-->
          <!--&lt;!&ndash;Recovery Suspend/Pause&ndash;&gt;-->
          <!--<el-button v-show="(scope.row.state === 'PAUSE' || scope.row.state === 'STOP') && buttonType === 'suspend'" type="warning" size="mini" :disabled="true"><span style="padding: 0 3px">{{scope.row.count}}</span></el-button>-->
          <!--&lt;!&ndash;Recovery Suspend&ndash;&gt;-->
          <!--<el-button v-show="(scope.row.state === 'PAUSE' || scope.row.state === 'STOP') && buttonType !== 'suspend'" type="warning" size="mini" icon="el-icon-video-play" :disabled="true"></el-button>-->
          <!--&lt;!&ndash;Pause&ndash;&gt;-->
          <!--<el-button v-show="scope.row.state !== 'PAUSE'" type="warning" size="mini" icon="el-icon-close" :disabled="true"></el-button>-->
          <!--&lt;!&ndash;Stop&ndash;&gt;-->
          <!--<el-button v-show="scope.row.state !== 'STOP'" type="warning" size="mini" icon="el-icon-video-pause" :disabled="true"></el-button>-->
          <!--&lt;!&ndash;Delete&ndash;&gt;-->
          <!--<el-button type="danger" size="mini" icon="el-icon-delete" :disabled="true"></el-button>-->
          <!--&lt;!&ndash;Gantt&ndash;&gt;-->
          <!--<el-button type="success" size="mini" icon="el-icon-s-operation" :disabled="true"></el-button>-->
        <!--</div>-->
      <!--</template>-->
    <!--</avue-crud>-->

  <!--</basic-container>-->
<!--</template>-->
<!--<script>-->
<!--import * as _ from 'lodash'-->
<!--import { mapActions } from 'vuex';-->

<!--import { tasksState, runningType } from '@/view-module/dolphin-scheduler/pages/dag/_source/config'-->

<!--export default {-->
  <!--props: {-->
    <!--type: {-->
      <!--type: Number,-->
      <!--default: 1-->
    <!--}-->
  <!--},-->
  <!--data(){-->
    <!--return {-->
      <!--tableLoading: false,-->
      <!--tableData: [],-->
      <!--page: {-->
        <!--pageSize: 10,-->
        <!--currentPage: 1,-->
        <!--total: 0-->
      <!--},-->
      <!--strDelete: '',-->
      <!--checkAll: false,-->
      <!--buttonType: '',-->
      <!--tableOption: {-->
        <!--height: 'auto',-->
        <!--calcHeight: 30,-->
        <!--tip: false,-->
        <!--searchShow: true,-->
        <!--searchMenuSpan: 6,-->
        <!--border: false,-->
        <!--editBtn: false,-->
        <!--addBtn: false,-->
        <!--// viewBtn: true,-->
        <!--delBtn: false,-->
        <!--dialogClickModal: false,-->
        <!--menuWidth: 280,-->
        <!--column: [-->
          <!--{-->
            <!--label: '任务名称',-->
            <!--prop: 'name',-->
            <!--minWidth: 200-->
          <!--},-->
          <!--{-->
            <!--label: '状态',-->
            <!--prop: 'state',-->
            <!--width: 50-->
          <!--},-->
          <!--{-->
            <!--label: '运行类型',-->
            <!--prop: 'commandType',-->
            <!--dicData: runningType,-->
            <!--props: {-->
              <!--label: 'desc',-->
              <!--value: 'code'-->
            <!--}-->
          <!--},-->
          <!--{-->
            <!--label: '调度时间',-->
            <!--prop: 'scheduleTime'-->
          <!--},-->
          <!--{-->
            <!--label: '开始时间',-->
            <!--prop: 'startTime',-->
            <!--type: 'datetime',-->
            <!--format: 'YYYY-MM-DD HH:mm:ss',-->
            <!--width: 130-->
          <!--},-->
          <!--{-->
            <!--label: '结束时间',-->
            <!--prop: 'endTime',-->
            <!--type: 'datetime',-->
            <!--format: 'YYYY-MM-DD HH:mm:ss',-->
            <!--width: 130-->
          <!--},-->
          <!--{-->
            <!--label: '运行时长',-->
            <!--prop: 'duration'-->
          <!--},-->
          <!--{-->
            <!--label: '运行次数',-->
            <!--prop: 'runTimes'-->
          <!--},-->
          <!--{-->
            <!--label: '容错标识',-->
            <!--prop: 'recovery'-->
          <!--},-->
          <!--{-->
            <!--label: '执行用户',-->
            <!--prop: 'executorName'-->
          <!--},-->
          <!--{-->
            <!--label: 'Host',-->
            <!--prop: 'host',-->
            <!--minWidth: 200-->
          <!--}-->
        <!--]-->
      <!--}-->
    <!--}-->
  <!--},-->
  <!--methods: {-->
    <!--...mapActions('dag', ['getProcessInstance' , 'editExecutorsState', 'deleteInstance', 'batchDeleteInstance']),-->
    <!--onLoad(){-->
      <!--this.tableLoading = true;-->
      <!--this.getProcessInstance({-->
        <!--pageSize: this.page.pageSize,-->
        <!--pageNo: this.page.currentPage,-->
        <!--type: this.type-->
      <!--}).then(-->
        <!--res => {-->
          <!--this.tableLoading = false;-->
          <!--this.tableData = this._listDataHandle(res['totalList'] || []);-->
          <!--this.page.total = res['total'] || 0;-->
        <!--}-->
      <!--).catch(() => {-->
        <!--this.tableLoading = false;-->
      <!--})-->
    <!--},-->
    <!--_listDataHandle (data) {-->
      <!--if (data.length) {-->
        <!--_.map(data, v => {-->
          <!--v.disabled = true-->
          <!--v.count = 9-->
        <!--})-->
      <!--}-->
      <!--return data-->
    <!--},-->
    <!--/**-->
     <!--* Return status-->
     <!--*/-->
    <!--_rtState (code) {-->
      <!--let o = tasksState[code]-->
      <!--return `<em class="fa ansfont ${o.icoUnicode} ${o.isSpin ? 'as as-spin' : ''}" style="color:${o.color}" data-toggle="tooltip" data-container="body" title="${o.desc}"></em>`-->
    <!--},-->
    <!--/**-->
     <!--* edit-->
     <!--*/-->
    <!--_reEdit (item) {-->
      <!--this.$router.push({ path: `/projects/instance/list/${item.id}` })-->
    <!--},-->
    <!--/**-->
     <!--* Rerun-->
     <!--* @param REPEAT_RUNNING-->
     <!--*/-->
    <!--_reRun (item, index) {-->
      <!--this._countDownFn({-->
        <!--id: item.id,-->
        <!--executeType: 'REPEAT_RUNNING',-->
        <!--index: index,-->
        <!--buttonType: 'run'-->
      <!--})-->
    <!--},-->
    <!--/**-->
     <!--* Countdown method refresh-->
     <!--*/-->
    <!--_countDownFn (param) {-->
      <!--this.buttonType = param.buttonType-->
      <!--this.editExecutorsState({-->
        <!--processInstanceId: param.id,-->
        <!--executeType: param.executeType-->
      <!--}).then(res => {-->
        <!--this.tableData[param.index].disabled = false-->
        <!--$('body').find('.tooltip.fade.top.in').remove()-->
        <!--this.$forceUpdate()-->
        <!--this.$message.success(res.msg)-->
        <!--// Countdown-->
        <!--this._countDown(() => {-->
          <!--this._onUpdate()-->
        <!--}, param.index)-->
      <!--}).catch(e => {-->
        <!--this.$message.error(e.msg || '')-->
        <!--this._onUpdate()-->
      <!--})-->
    <!--},-->
    <!--/**-->
     <!--* Countdown-->
     <!--*/-->
    <!--_countDown (fn, index) {-->
      <!--const TIME_COUNT = 10-->
      <!--let timer-->
      <!--let $count-->
      <!--if (!timer) {-->
        <!--$count = TIME_COUNT-->
        <!--timer = setInterval(() => {-->
          <!--if ($count > 0 && $count <= TIME_COUNT) {-->
            <!--$count&#45;&#45;-->
            <!--this.tableData[index].count = $count-->
            <!--this.$forceUpdate()-->
          <!--} else {-->
            <!--fn()-->
            <!--clearInterval(timer)-->
            <!--timer = null-->
          <!--}-->
        <!--}, 1000)-->
      <!--}-->
    <!--},-->
    <!--_gantt (item) {-->
      <!--this.$router.push({ path: `/projects/instance/gantt/${item.id}` })-->
    <!--},-->
    <!--_onUpdate(){-->
      <!--this.onLoad();-->
    <!--},-->
    <!--/**-->
     <!--* Resume running-->
     <!--* @param PAUSE => RECOVER_SUSPENDED_PROCESS-->
     <!--* @param FAILURE => START_FAILURE_TASK_PROCESS-->
     <!--*/-->
    <!--_restore (item, index) {-->
      <!--this._countDownFn({-->
        <!--id: item.id,-->
        <!--executeType: 'START_FAILURE_TASK_PROCESS',-->
        <!--index: index,-->
        <!--buttonType: 'store'-->
      <!--})-->
    <!--},-->
    <!--/**-->
     <!--* stop-->
     <!--* @param STOP-->
     <!--*/-->
    <!--_stop (item, index) {-->
      <!--if (item.state === 'STOP') {-->
        <!--this._countDownFn({-->
          <!--id: item.id,-->
          <!--executeType: 'RECOVER_SUSPENDED_PROCESS',-->
          <!--index: index,-->
          <!--buttonType: 'suspend'-->
        <!--})-->
      <!--} else {-->
        <!--this._upExecutorsState({-->
          <!--processInstanceId: item.id,-->
          <!--executeType: 'STOP'-->
        <!--})-->
      <!--}-->
    <!--},-->
    <!--/**-->
     <!--* pause-->
     <!--* @param PAUSE-->
     <!--*/-->
    <!--_suspend (item, index) {-->
      <!--if (item.state === 'PAUSE') {-->
        <!--this._countDownFn({-->
          <!--id: item.id,-->
          <!--executeType: 'RECOVER_SUSPENDED_PROCESS',-->
          <!--index: index,-->
          <!--buttonType: 'suspend'-->
        <!--})-->
      <!--} else {-->
        <!--this._upExecutorsState({-->
          <!--processInstanceId: item.id,-->
          <!--executeType: 'PAUSE'-->
        <!--})-->
      <!--}-->
    <!--},-->
    <!--/**-->
     <!--* delete-->
     <!--*/-->
    <!--_delete (item, i) {-->
      <!--// remove tow++-->
      <!--if (i < 0) {-->
        <!--this._batchDelete()-->
        <!--return-->
      <!--}-->
      <!--// remove one-->
      <!--this.deleteInstance({-->
        <!--processInstanceId: item.id-->
      <!--}).then(res => {-->
        <!--this._onUpdate()-->
        <!--this.$message.success(res.msg)-->
      <!--}).catch(e => {-->
        <!--this.$message.error(e.msg || '')-->
      <!--})-->
    <!--},-->
    <!--_batchDelete () {-->
      <!--this.batchDeleteInstance({-->
        <!--processInstanceIds: this.strDelete-->
      <!--}).then(res => {-->
        <!--this._onUpdate()-->
        <!--this.checkAll = false-->
        <!--this.strDelete = ''-->
        <!--this.$message.success(res.msg)-->
      <!--}).catch(e => {-->
        <!--this.checkAll = false-->
        <!--this.strDelete = ''-->
        <!--this.$message.error(e.msg || '')-->
      <!--})-->
    <!--}-->
  <!--}-->
<!--}-->
<!--</script>-->
